calendar: Fix abbreviated day names
authorNiels De Graef <nielsdegraef@gmail.com>
Tue, 12 Oct 2021 17:29:26 +0000 (19:29 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 31 Oct 2021 21:52:04 +0000 (17:52 -0400)
commit5a2f94b7efff673db06af1181c44d3bfa31dc34e
tree0ea70c5271462198303629642b48f431371d05cf
parent59dd0dccbf3f11d19f92b5c5a80c3e6c1626a2a3
calendar: Fix abbreviated day names

... if the current locale has a different starting day than Sunday.

This needed 2 fixes:
* We need to take into account `calendar->week_start` when
  creating/adding the appropriate `day_name_labels` field
* we were only calculating `calendar->week_start` _after_ attaching the
  `day_name_labels`, so it was still set to 0 (the default value).

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/4338
gtk/gtkcalendar.c